home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / C++ / Applications / Lookup 1.0d2 / Includes / CEntryList.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-09-04  |  1.4 KB  |  67 lines  |  [TEXT/CWIE]

  1. /*
  2.     CEntryList.h
  3.  
  4.     History:    
  5.         Tue, 18 Jul 1995    AJR    Created.
  6. */
  7.  
  8. #pragma once
  9.  
  10. #include "CListBox.h"
  11. #include "CList.h"
  12.  
  13. class CEntry;
  14. class CLookupDocument;
  15.  
  16. // ------------------------------------------------------------
  17. // CLASS CEntryListBox
  18.  
  19. class CEntryList : public CListBox, public LListener
  20. {
  21. public:
  22.     enum {
  23.         kEmptySelection = -1
  24.     };
  25.     
  26.     static void        Register();
  27.  
  28.     void            SetLookupDocument(CLookupDocument *);
  29.     
  30.     UInt16            InsertRow(UInt16 row, UInt16 count = 1);
  31.     void            DeleteRow(Uint16 row, UInt16 count = 1);
  32.     
  33.     void            SetSelection(UInt16 row, Boolean select = true);
  34.     Int16            GetSelection() const;
  35.  
  36.     void            InvalidateRow(UInt16 row);
  37.  
  38.     virtual Boolean ObeyCommand(CommandT inCommand, void * ioParam = nil);
  39.     virtual void    FindCommandStatus(CommandT inCommand, Boolean & outEnabled,
  40.         Boolean & outUsesMark, Char16 & outMark, Str255 outName);
  41.  
  42.     virtual void    ListenToMessage(MessageT inMessage, void * ioParam);
  43.  
  44. private:
  45.     CLookupDocument *    mDocument;
  46.  
  47.     CEntryList(LStream * inStream);
  48.  
  49.     virtual void    FinishCreateSelf();
  50.  
  51.     virtual void    LDEFInitialize();
  52.     virtual void    LDEFDraw( Boolean lSelect, Rect *lRect, Cell lCell,
  53.                         short lDataOffset, short lDataLen );
  54.     virtual void    LDEFHilite( Boolean lSelect, Rect *lRect, Cell lCell,
  55.                         short lDataOffset, short lDataLen );
  56.  
  57.     const CEntry &    GetEntryAt(Cell cell) const;
  58.  
  59.     UInt16            GetRowCount() const;
  60.  
  61.     enum {
  62.         kClassID = 'RECL'
  63.     };
  64.     static CEntryList * CreateFromStream(LStream * inStream);
  65. };
  66.  
  67.